package com.hengpeng.itfin.persist.impl;

import org.springframework.stereotype.Repository;

import com.hengpeng.common.persist.AbstractDao;
import com.hengpeng.common.persist.query.DynamicQuery;
import com.hengpeng.itfin.persist.ActivityDao;
import com.hengpeng.itfinbase.en.ActivityType;
import com.hengpeng.itfinbase.persist.Activity;

@Repository
public class ActivityDaoImpl extends AbstractDao<Activity> implements ActivityDao {

    @Override
    public Activity getActivityByType(ActivityType activityType) {
        DynamicQuery query = new DynamicQuery(Activity.class);
        query.eq("activityType", activityType);
        return super.getSingleByDynamicQuery(query);
    }

}
